#ifndef __BASE_TYPE_H__
#define __BASE_TYPE_H__

#ifndef SUCCESS
#define SUCCESS 0
#define FAILED  1
#endif

///< 错误码
enum {
    INIT_INPUT_INVALID      = 2,
    INIT_INPUT_EXIT         = 3,
};

typedef unsigned char U8;
typedef char S8;
typedef unsigned short U16;
typedef short S16;
typedef unsigned int U32;
typedef int S32;
typedef long Long;
typedef unsigned long ULong;

///< 计算数组长度
#define SIZE_OF_ARRAY(LIST) (sizeof(LIST)/sizeof(LIST[0]))

///< 计算最大值
#define MAX(A, B) (((A)>(B))?(A):(B))

#endif ///< __BASE_TYPE_H__
